From: Ian Campbell Date: Tue, 24 May 2011 15:15:53 +0000 (+0100) Subject: libxl: improve logging on failure to start device model. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10317 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=306fa5ad641e49f1232d3ff2d224995e2ecb237f;p=xen.git libxl: improve logging on failure to start device model. Distinguish between device model dying during startup (libxl__spawn_check returns failure) and timing out while waiting for the xenstore node to show up. Signed-off-by: Ian Campbell Acked-by: Ian Jackson Committed-by: Ian Jackson --- diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index a3826bdc1c..cc3ae25d1a 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl/libxl_device.c @@ -445,6 +445,8 @@ int libxl__wait_for_device_model(libxl__gc *gc, if ( starting ) { rc = libxl__spawn_check(gc, starting->for_spawn); if ( rc ) { + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, + "Device Model died during startup"); rc = -1; goto err_died; } @@ -487,10 +489,10 @@ again: } } } + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Device Model not ready"); err_died: xs_unwatch(xsh, path, path); xs_daemon_close(xsh); - LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Device Model not ready"); err: return -1; }